/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * JInternalFrameReport.java
 *
 * Created on Dec 4, 2011, 12:26:32 PM
 */
package bugreportingsystem;

import Util.BugReport;
import Util.CommonQuery;
import Util.Customer;
import Util.DispatchNo;
import Util.Produce;
import Util.Solution;
import Util.Status;
import Util.TypeReport;
import java.awt.Color;
import java.awt.Font;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.ResourceBundle;
import java.util.Vector;
import javax.swing.BorderFactory;
import javax.swing.DefaultComboBoxModel;
import javax.swing.JOptionPane;
import javax.swing.border.Border;
import javax.swing.border.TitledBorder;
import javax.swing.table.DefaultTableModel;

/**
 *
 * @author Jack
 */
public class JInternalFrameReport extends javax.swing.JInternalFrame {

    /** Creates new form JInternalFrameReport */
    private Vector<String> displaystype = new Vector<String>();
    private Vector<Integer> valuetype = new Vector<Integer>();
    private Vector<DispatchNo> ep1 = DispatchNo.ListIDD();
    private int iddispatch = -1;
    private int idcustomer = 0;
    public static int idemployee = JFrameLogin.idemployee;
    private String namecustomer = "";
    private int iddispatch1 = -1;
    int r = -1;
    int r1 = -1;
    private int idreport = -1;
    private String language = JFrameLogin.language;
    private String country = JFrameLogin.country;
    private Locale lc = new Locale(language, country);
    private ResourceBundle rb = ResourceBundle.getBundle("bugreportingsystem/resources/JInternalFrameReport", lc);

    public JInternalFrameReport() {
        initComponents();
        AddType();
        DisplayReport(BugReport.ListIDRP());
        DisplayDispatch(ep1);
        AddYear();
        Date now = new Date();
        Calendar c2 = Calendar.getInstance();
        c2.setTime(now);
        String year = String.valueOf(c2.get(Calendar.YEAR));
        int day1 = c2.get(Calendar.DATE) + 3;
        String day = "";
        if (day1 < 10) {
            day = String.valueOf("0" + day1);
        } else {
            day = String.valueOf(day1);
        }
        int month1 = c2.get(Calendar.MONTH) + 1;
        String month = "";
        if (month1 < 10) {
            month = String.valueOf("0" + month1);
        } else {
            month = String.valueOf(month1);
        }

        this.jComboBoxYear.setSelectedItem(year);
        this.jComboBoxDay.setSelectedItem(day);
        this.jComboBoxMonth.setSelectedItem(month);
        MyTranslate(language, country);
    }

    private TitledBorder SetTitleBorder(String a) {
        Border etched = BorderFactory.createEtchedBorder();
        Font font = new Font("Tahoma", Font.BOLD, 14);
        TitledBorder Title = BorderFactory.createTitledBorder(etched, rb.getString(a));
        Title.setTitleJustification(TitledBorder.LEFT);
        Title.setTitleFont(font);
        Title.setTitleColor(Color.getColor("BLUE", 204));
        return Title;
    }

    private void MyTranslate(String language, String country) {
        this.setTitle(rb.getString("Form.title"));
        jButtonSearchReport.setText(rb.getString("jButtonSearchReport.text"));
        jRadioButtonIDDispatch.setText(rb.getString("jRadioButtonIDDispatch.text"));
        jRadioButtonNotSolve.setText(rb.getString("jRadioButtonNotSolve.text"));
        jRadioButtonSolve.setText(rb.getString("jRadioButtonSolve.text"));
        jButton1.setText(rb.getString("jButton1.text"));
        jButton2.setText(rb.getString("jButtonSearchReport.text"));
        jButton3.setText(rb.getString("jButton3.text"));
        Border etched = BorderFactory.createEtchedBorder();
        jPanel4.setBorder(SetTitleBorder("jPanel12.border.title"));
        jPanel12.setBorder(SetTitleBorder("jPanel4.border.title"));
        jPanel13.setBorder(SetTitleBorder("jPanel13.border.title"));
        jLabel6.setText(rb.getString("jLabel6.text"));
        jLabel7.setText(rb.getString("jLabel7.text"));
        jLabel8.setText(rb.getString("jLabel8.text"));
        jLabel9.setText(rb.getString("jLabel9.text"));
        jLabel10.setText(rb.getString("jLabel10.text"));
        jLabel11.setText(rb.getString("jLabel11.text"));
        jLabel12.setText(rb.getString("jLabel12.text"));
        jButtonSave.setText(rb.getString("jButtonSave.text"));
        jButtonUpdate.setText(rb.getString("jButtonUpdate.text"));
        jButtonClean.setText(rb.getString("jButtonClean.text"));
        jPanel37.setBorder(SetTitleBorder("jPanel37.border.title"));
        jRadioButtonDispatch.setText(rb.getString("jRadioButtonDispatch.text"));
        jRadioButtonOrder.setText(rb.getString("jRadioButtonOrder.text"));
        jPanel45.setBorder(SetTitleBorder("jPanel45.border.title"));
        jPanel47.setBorder(SetTitleBorder("jPanel47.border.title"));
        jPanel48.setBorder(SetTitleBorder("jPanel48.border.title"));
        jLabel1.setText(rb.getString("jLabel1.text"));
        jLabel2.setText(rb.getString("jLabel2.text"));
        jLabel3.setText(rb.getString("jLabel3.text"));
        jLabel4.setText(rb.getString("jLabel4.text"));
        jLabel5.setText(rb.getString("jLabel5.text"));
        jLabel13.setText(rb.getString("jLabel13.text"));
        jLabel15.setText(rb.getString("jLabel15.text"));
        jLabel14.setText(rb.getString("jLabel14.text"));
    }

    private boolean CanculateDay() {
        boolean kq = true;
        try {
            String datefinish = this.jComboBoxYear.getSelectedItem().toString() + "-" + this.jComboBoxMonth.getSelectedItem().toString() + "-" + this.jComboBoxDay.getSelectedItem().toString();
            SimpleDateFormat spf = new SimpleDateFormat("yyyy-MM-dd");
            spf.setLenient(false);
            Date datefinish1 = spf.parse(datefinish);
            Date now = new Date();
            Calendar now1 = Calendar.getInstance();
            Calendar datefinish11 = Calendar.getInstance();
            now1.setTime(now);
            datefinish11.setTime(datefinish1);
            long milis1 = now1.getTimeInMillis();
            long milis2 = datefinish11.getTimeInMillis();
            long diff = milis2 - milis1;
            long day = diff / (24 * 60 * 60 * 1000);

            if (day >= 7) {
                return false;
            } else if (day > 0) {
                return true;
            } else if (day < 0) {
                return false;
            }
        } catch (Exception ex) {
            return false;
        }

        return kq;
    }

    private boolean CheckDate() {
        boolean kq = true;
        try {
            String day = this.jComboBoxYear.getSelectedItem().toString() + "-" + this.jComboBoxMonth.getSelectedItem().toString() + "-" + this.jComboBoxDay.getSelectedItem().toString();
            SimpleDateFormat spf = new SimpleDateFormat("yyyy-MM-dd");
            spf.setLenient(false);
            Date ngaysinh = spf.parse(day);
            Calendar c1 = Calendar.getInstance();
            c1.setTime(ngaysinh);

        } catch (Exception ex) {
            return false;
        }

        return kq;
    }

    private void AddYear() {
        try {
            Vector<String> year = new Vector<String>();
            for (int i = 2011; i < 2100; i++) {
                year.add(String.valueOf(i));
            }
            DefaultComboBoxModel dcb = new DefaultComboBoxModel(year);
            this.jComboBoxYear.setModel(dcb);


        } catch (Exception e) {
            System.out.println(e);
        }
    }

    private void AddType() {
        TypeReport st = new TypeReport();
        Vector<TypeReport> vrl = new Vector<TypeReport>();
        vrl = st.ListIDD();

        for (TypeReport i : vrl) {
            valuetype.add(i.getIdtype());
            displaystype.add(i.getNametype());
        }
        DefaultComboBoxModel dcb1 = new DefaultComboBoxModel(displaystype);
        jComboBoxType.setModel(dcb1);
    }

    private void DisplayReport(Vector<BugReport> br) {
        Vector<String> cols = new Vector<String>();
        cols.add("idreport");
        cols.add("name customer");
        cols.add("iddispatch");
        cols.add("Date_Receive");
        cols.add("Date_Finish");
        cols.add("Status");
        BugReport ep = new BugReport();
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        for (int i = 0; i < br.size(); i++) {
            Vector<Object> i1 = new Vector<Object>();
            String namestatus = Status.ListStatus(br.get(i).getIdreport());
            String namecustom = Customer.ListNameCustom(br.get(i).getIdreport());
            i1.add(br.get(i).getIdreport());
            i1.add(namecustom);
            i1.add(br.get(i).getIddispatch());
            i1.add(br.get(i).getDatereceive());
            i1.add(br.get(i).getDatefinish());
            i1.add(namestatus);
            rows.add(i1);
        }
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {
            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableReport.setModel(dtm);
        this.jTableReport.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayReportNull() {
        Vector<String> cols = new Vector<String>();
        cols.add("idreport");
        cols.add("name customer");
        cols.add("iddispatch");
        cols.add("Date_Receive");
        cols.add("Date_Finish");
        cols.add("Status");
        BugReport ep = new BugReport();
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {
            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableReport.setModel(dtm);
        this.jTableReport.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayDispatch(Vector<DispatchNo> a) {
        Vector<String> cols = new Vector<String>();
        cols.add("iddispatch");
        cols.add("idorder");
        cols.add("Name Produce");
        cols.add("Name Customer");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        for (int i = 0; i < a.size(); i++) {
            Vector<Object> i1 = new Vector<Object>();
            String nameproduce = Produce.ListTName(a.get(i).getIddispatch());
            i1.add(a.get(i).getIddispatch());
            i1.add(a.get(i).getIdorder());
            i1.add(nameproduce);
            i1.add(a.get(i).getNamecustomer());
            rows.add(i1);
        }
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };
        this.jTableDispatch.setModel(dtm);
        this.jTableDispatch.getTableHeader().setReorderingAllowed(false);
    }

    private void DisplayDispatchNull() {
        Vector<String> cols = new Vector<String>();
        cols.add("iddispatch");
        cols.add("idorder");
        cols.add("Name Produce");
        cols.add("Name Customer");
        Vector<Vector<Object>> rows = new Vector<Vector<Object>>();
        DefaultTableModel dtm = new DefaultTableModel(rows, cols) {

            @Override
            public boolean isCellEditable(int row, int column) {
                return false;
            }
        };

        this.jTableDispatch.setModel(dtm);
        this.jTableDispatch.getTableHeader().setReorderingAllowed(false);
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane2 = new javax.swing.JScrollPane();
        jTable1 = new javax.swing.JTable();
        buttonGroup1 = new javax.swing.ButtonGroup();
        buttonGroup2 = new javax.swing.ButtonGroup();
        buttonGroup3 = new javax.swing.ButtonGroup();
        jPanel1 = new javax.swing.JPanel();
        jPanel2 = new javax.swing.JPanel();
        jPanel4 = new javax.swing.JPanel();
        jPanel6 = new javax.swing.JPanel();
        jPanel9 = new javax.swing.JPanel();
        jTextFieldSearchReport = new javax.swing.JTextField();
        jPanel58 = new javax.swing.JPanel();
        jButtonSearchReport = new javax.swing.JButton();
        jPanel7 = new javax.swing.JPanel();
        jPanel10 = new javax.swing.JPanel();
        jPanel11 = new javax.swing.JPanel();
        jButton1 = new javax.swing.JButton();
        jPanel41 = new javax.swing.JPanel();
        jRadioButtonIDDispatch = new javax.swing.JRadioButton();
        jRadioButtonNotSolve = new javax.swing.JRadioButton();
        jRadioButtonSolve = new javax.swing.JRadioButton();
        jPanel5 = new javax.swing.JPanel();
        jPanel12 = new javax.swing.JPanel();
        JTableOrder = new javax.swing.JScrollPane();
        jTableReport = new javax.swing.JTable();
        jPanel13 = new javax.swing.JPanel();
        jPanel14 = new javax.swing.JPanel();
        jPanel16 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        jLabel7 = new javax.swing.JLabel();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jPanel17 = new javax.swing.JPanel();
        jTextFieldNameCustom = new javax.swing.JTextField();
        jTextFieldIDDispatch = new javax.swing.JTextField();
        jComboBoxType = new javax.swing.JComboBox();
        jTextFieldTitle = new javax.swing.JTextField();
        jPanel15 = new javax.swing.JPanel();
        jPanel19 = new javax.swing.JPanel();
        jPanel20 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        jPanel21 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTextAreaContent = new javax.swing.JTextArea();
        jPanel18 = new javax.swing.JPanel();
        jPanel22 = new javax.swing.JPanel();
        jLabel11 = new javax.swing.JLabel();
        jPanel23 = new javax.swing.JPanel();
        jPanel24 = new javax.swing.JPanel();
        jPanel26 = new javax.swing.JPanel();
        jTextFieldStatus = new javax.swing.JTextField();
        jPanel27 = new javax.swing.JPanel();
        jPanel28 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        jPanel29 = new javax.swing.JPanel();
        jPanel30 = new javax.swing.JPanel();
        jComboBoxYear = new javax.swing.JComboBox();
        jPanel31 = new javax.swing.JPanel();
        jComboBoxDay = new javax.swing.JComboBox();
        jComboBoxMonth = new javax.swing.JComboBox();
        jPanel25 = new javax.swing.JPanel();
        jButtonSave = new javax.swing.JButton();
        jButtonUpdate = new javax.swing.JButton();
        jButtonClean = new javax.swing.JButton();
        jPanel3 = new javax.swing.JPanel();
        jPanel32 = new javax.swing.JPanel();
        jPanel34 = new javax.swing.JPanel();
        jPanel35 = new javax.swing.JPanel();
        jPanel36 = new javax.swing.JPanel();
        jButtonNext = new javax.swing.JButton();
        jButtonPrevious = new javax.swing.JButton();
        jPanel33 = new javax.swing.JPanel();
        jPanel37 = new javax.swing.JPanel();
        jPanel40 = new javax.swing.JPanel();
        jPanel42 = new javax.swing.JPanel();
        jTextFieldSearchDis = new javax.swing.JTextField();
        jPanel57 = new javax.swing.JPanel();
        jButton2 = new javax.swing.JButton();
        jPanel39 = new javax.swing.JPanel();
        jPanel43 = new javax.swing.JPanel();
        jPanel44 = new javax.swing.JPanel();
        jRadioButtonDispatch = new javax.swing.JRadioButton();
        jRadioButtonOrder = new javax.swing.JRadioButton();
        jButton3 = new javax.swing.JButton();
        jPanel38 = new javax.swing.JPanel();
        jPanel45 = new javax.swing.JPanel();
        JTableOrder1 = new javax.swing.JScrollPane();
        jTableDispatch = new javax.swing.JTable();
        jPanel46 = new javax.swing.JPanel();
        jPanel47 = new javax.swing.JPanel();
        jPanel49 = new javax.swing.JPanel();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        jPanel50 = new javax.swing.JPanel();
        jTextFieldName = new javax.swing.JTextField();
        jTextFieldSex = new javax.swing.JTextField();
        jTextFieldAddress = new javax.swing.JTextField();
        jTextFieldEmail = new javax.swing.JTextField();
        jTextFieldPhone = new javax.swing.JTextField();
        jPanel48 = new javax.swing.JPanel();
        jPanel51 = new javax.swing.JPanel();
        jPanel53 = new javax.swing.JPanel();
        jLabel13 = new javax.swing.JLabel();
        jLabel15 = new javax.swing.JLabel();
        jPanel54 = new javax.swing.JPanel();
        jTextFieldNameBackEnd = new javax.swing.JTextField();
        jPanel55 = new javax.swing.JPanel();
        jTextFieldDateSolve = new javax.swing.JTextField();
        jPanel52 = new javax.swing.JPanel();
        jPanel59 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jPanel60 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jTextArea2 = new javax.swing.JTextArea();

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jTable1.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Title 1", "Title 2", "Title 3", "Title 4"
            }
        ));
        jTable1.setName("jTable1"); // NOI18N
        jScrollPane2.setViewportView(jTable1);

        setClosable(true);
        setIconifiable(true);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(bugreportingsystem.BugReportingSystemApp.class).getContext().getResourceMap(JInternalFrameReport.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setFrameIcon(resourceMap.getIcon("Form.frameIcon")); // NOI18N
        setName("Form"); // NOI18N
        setPreferredSize(new java.awt.Dimension(1018, 607));

        jPanel1.setName("jPanel1"); // NOI18N
        jPanel1.setPreferredSize(new java.awt.Dimension(1005, 595));
        jPanel1.setLayout(new java.awt.GridLayout(1, 2, 5, 0));

        jPanel2.setName("jPanel2"); // NOI18N
        jPanel2.setPreferredSize(new java.awt.Dimension(500, 365));
        jPanel2.setLayout(new java.awt.BorderLayout(0, 2));

        jPanel4.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel4.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel4.border.titleFont"), resourceMap.getColor("jPanel4.border.titleColor"))); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N
        jPanel4.setPreferredSize(new java.awt.Dimension(474, 90));
        jPanel4.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel6.setName("jPanel6"); // NOI18N
        jPanel6.setPreferredSize(new java.awt.Dimension(250, 35));
        jPanel6.setLayout(new java.awt.BorderLayout(15, 0));

        jPanel9.setName("jPanel9"); // NOI18N
        jPanel9.setPreferredSize(new java.awt.Dimension(115, 33));
        jPanel9.setLayout(new java.awt.BorderLayout());

        jTextFieldSearchReport.setName("jTextFieldSearchReport"); // NOI18N
        jPanel9.add(jTextFieldSearchReport, java.awt.BorderLayout.CENTER);

        jPanel6.add(jPanel9, java.awt.BorderLayout.CENTER);

        jPanel58.setName("jPanel58"); // NOI18N
        jPanel58.setPreferredSize(new java.awt.Dimension(115, 33));
        jPanel58.setLayout(new java.awt.BorderLayout());

        jButtonSearchReport.setIcon(resourceMap.getIcon("jButtonSearchReport.icon")); // NOI18N
        jButtonSearchReport.setText(resourceMap.getString("jButtonSearchReport.text")); // NOI18N
        jButtonSearchReport.setName("jButtonSearchReport"); // NOI18N
        jButtonSearchReport.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSearchReportActionPerformed(evt);
            }
        });
        jPanel58.add(jButtonSearchReport, java.awt.BorderLayout.CENTER);

        jPanel6.add(jPanel58, java.awt.BorderLayout.LINE_END);

        jPanel4.add(jPanel6);

        jPanel7.setName("jPanel7"); // NOI18N
        jPanel7.setLayout(new java.awt.BorderLayout());

        jPanel10.setName("jPanel10"); // NOI18N
        jPanel10.setPreferredSize(new java.awt.Dimension(0, 28));

        javax.swing.GroupLayout jPanel10Layout = new javax.swing.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 28, Short.MAX_VALUE)
        );

        jPanel7.add(jPanel10, java.awt.BorderLayout.LINE_START);

        jPanel11.setName("jPanel11"); // NOI18N
        jPanel11.setLayout(new java.awt.BorderLayout());

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.setPreferredSize(new java.awt.Dimension(115, 25));
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });
        jPanel11.add(jButton1, java.awt.BorderLayout.LINE_END);

        jPanel41.setName("jPanel41"); // NOI18N
        jPanel41.setLayout(new java.awt.GridLayout(1, 3));

        buttonGroup1.add(jRadioButtonIDDispatch);
        jRadioButtonIDDispatch.setText(resourceMap.getString("jRadioButtonIDDispatch.text")); // NOI18N
        jRadioButtonIDDispatch.setName("jRadioButtonIDDispatch"); // NOI18N
        jRadioButtonIDDispatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonIDDispatchActionPerformed(evt);
            }
        });
        jPanel41.add(jRadioButtonIDDispatch);

        buttonGroup1.add(jRadioButtonNotSolve);
        jRadioButtonNotSolve.setText(resourceMap.getString("jRadioButtonNotSolve.text")); // NOI18N
        jRadioButtonNotSolve.setName("jRadioButtonNotSolve"); // NOI18N
        jRadioButtonNotSolve.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonNotSolveActionPerformed(evt);
            }
        });
        jPanel41.add(jRadioButtonNotSolve);

        buttonGroup1.add(jRadioButtonSolve);
        jRadioButtonSolve.setText(resourceMap.getString("jRadioButtonSolve.text")); // NOI18N
        jRadioButtonSolve.setName("jRadioButtonSolve"); // NOI18N
        jRadioButtonSolve.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonSolveActionPerformed(evt);
            }
        });
        jPanel41.add(jRadioButtonSolve);

        jPanel11.add(jPanel41, java.awt.BorderLayout.CENTER);

        jPanel7.add(jPanel11, java.awt.BorderLayout.CENTER);

        jPanel4.add(jPanel7);

        jPanel2.add(jPanel4, java.awt.BorderLayout.PAGE_START);

        jPanel5.setName("jPanel5"); // NOI18N
        jPanel5.setLayout(new java.awt.BorderLayout());

        jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel12.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel12.border.titleFont"), resourceMap.getColor("jPanel12.border.titleColor"))); // NOI18N
        jPanel12.setName("jPanel12"); // NOI18N
        jPanel12.setPreferredSize(new java.awt.Dimension(498, 140));
        jPanel12.setLayout(new java.awt.BorderLayout());

        JTableOrder.setName("JTableOrder"); // NOI18N
        JTableOrder.setPreferredSize(new java.awt.Dimension(452, 410));

        jTableReport.setName("jTableReport"); // NOI18N
        jTableReport.setPreferredSize(new java.awt.Dimension(0, 410));
        jTableReport.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableReport.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableReportMouseClicked(evt);
            }
            public void mouseEntered(java.awt.event.MouseEvent evt) {
                jTableReportMouseEntered(evt);
            }
        });
        jTableReport.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTableReportKeyReleased(evt);
            }
        });
        JTableOrder.setViewportView(jTableReport);

        jPanel12.add(JTableOrder, java.awt.BorderLayout.CENTER);

        jPanel5.add(jPanel12, java.awt.BorderLayout.PAGE_START);

        jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel13.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel13.border.titleFont"), resourceMap.getColor("jPanel13.border.titleColor"))); // NOI18N
        jPanel13.setName("jPanel13"); // NOI18N
        jPanel13.setLayout(new java.awt.BorderLayout(0, 5));

        jPanel14.setName("jPanel14"); // NOI18N
        jPanel14.setPreferredSize(new java.awt.Dimension(377, 120));
        jPanel14.setLayout(new java.awt.BorderLayout(10, 0));

        jPanel16.setName("jPanel16"); // NOI18N
        jPanel16.setPreferredSize(new java.awt.Dimension(90, 107));
        jPanel16.setLayout(new java.awt.GridLayout(4, 1, 0, 5));

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N
        jPanel16.add(jLabel6);

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N
        jPanel16.add(jLabel7);

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N
        jPanel16.add(jLabel8);

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N
        jPanel16.add(jLabel9);

        jPanel14.add(jPanel16, java.awt.BorderLayout.LINE_START);

        jPanel17.setName("jPanel17"); // NOI18N
        jPanel17.setLayout(new java.awt.GridLayout(4, 1, 0, 5));

        jTextFieldNameCustom.setEnabled(false);
        jTextFieldNameCustom.setName("jTextFieldNameCustom"); // NOI18N
        jPanel17.add(jTextFieldNameCustom);

        jTextFieldIDDispatch.setEnabled(false);
        jTextFieldIDDispatch.setName("jTextFieldIDDispatch"); // NOI18N
        jPanel17.add(jTextFieldIDDispatch);

        jComboBoxType.setName("jComboBoxType"); // NOI18N
        jPanel17.add(jComboBoxType);

        jTextFieldTitle.setName("jTextFieldTitle"); // NOI18N
        jPanel17.add(jTextFieldTitle);

        jPanel14.add(jPanel17, java.awt.BorderLayout.CENTER);

        jPanel13.add(jPanel14, java.awt.BorderLayout.PAGE_START);

        jPanel15.setName("jPanel15"); // NOI18N
        jPanel15.setLayout(new java.awt.BorderLayout(15, 5));

        jPanel19.setName("jPanel19"); // NOI18N
        jPanel19.setPreferredSize(new java.awt.Dimension(266, 100));
        jPanel19.setLayout(new java.awt.BorderLayout(10, 0));

        jPanel20.setName("jPanel20"); // NOI18N
        jPanel20.setPreferredSize(new java.awt.Dimension(90, 107));
        jPanel20.setRequestFocusEnabled(false);
        jPanel20.setLayout(new java.awt.GridLayout(3, 1));

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N
        jPanel20.add(jLabel10);

        jPanel19.add(jPanel20, java.awt.BorderLayout.LINE_START);

        jPanel21.setName("jPanel21"); // NOI18N
        jPanel21.setLayout(new java.awt.BorderLayout());

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jTextAreaContent.setColumns(20);
        jTextAreaContent.setRows(5);
        jTextAreaContent.setName("jTextAreaContent"); // NOI18N
        jScrollPane4.setViewportView(jTextAreaContent);

        jPanel21.add(jScrollPane4, java.awt.BorderLayout.CENTER);

        jPanel19.add(jPanel21, java.awt.BorderLayout.CENTER);

        jPanel15.add(jPanel19, java.awt.BorderLayout.CENTER);

        jPanel18.setName("jPanel18"); // NOI18N
        jPanel18.setPreferredSize(new java.awt.Dimension(486, 60));
        jPanel18.setLayout(new java.awt.BorderLayout(10, 5));

        jPanel22.setName("jPanel22"); // NOI18N
        jPanel22.setPreferredSize(new java.awt.Dimension(90, 77));
        jPanel22.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N
        jPanel22.add(jLabel11);

        jPanel18.add(jPanel22, java.awt.BorderLayout.LINE_START);

        jPanel23.setName("jPanel23"); // NOI18N
        jPanel23.setLayout(new java.awt.GridLayout(2, 1, 0, 10));

        jPanel24.setName("jPanel24"); // NOI18N
        jPanel24.setLayout(new java.awt.BorderLayout(30, 0));

        jPanel26.setName("jPanel26"); // NOI18N
        jPanel26.setPreferredSize(new java.awt.Dimension(80, 22));
        jPanel26.setLayout(new java.awt.BorderLayout());

        jTextFieldStatus.setEditable(false);
        jTextFieldStatus.setText(resourceMap.getString("jTextFieldStatus.text")); // NOI18N
        jTextFieldStatus.setName("jTextFieldStatus"); // NOI18N
        jPanel26.add(jTextFieldStatus, java.awt.BorderLayout.CENTER);

        jPanel24.add(jPanel26, java.awt.BorderLayout.LINE_START);

        jPanel27.setName("jPanel27"); // NOI18N
        jPanel27.setLayout(new java.awt.BorderLayout(25, 0));

        jPanel28.setName("jPanel28"); // NOI18N
        jPanel28.setLayout(new java.awt.BorderLayout());

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N
        jPanel28.add(jLabel12, java.awt.BorderLayout.CENTER);

        jPanel27.add(jPanel28, java.awt.BorderLayout.LINE_START);

        jPanel29.setName("jPanel29"); // NOI18N
        jPanel29.setLayout(new java.awt.BorderLayout(15, 0));

        jPanel30.setName("jPanel30"); // NOI18N
        jPanel30.setPreferredSize(new java.awt.Dimension(70, 39));
        jPanel30.setLayout(new java.awt.BorderLayout());

        jComboBoxYear.setName("jComboBoxYear"); // NOI18N
        jPanel30.add(jComboBoxYear, java.awt.BorderLayout.CENTER);

        jPanel29.add(jPanel30, java.awt.BorderLayout.LINE_END);

        jPanel31.setName("jPanel31"); // NOI18N
        jPanel31.setLayout(new java.awt.GridLayout(1, 2, 15, 0));

        jComboBoxDay.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", "22", "23", "24", "25", "26", "27", "28", "29", "30", "31" }));
        jComboBoxDay.setName("jComboBoxDay"); // NOI18N
        jPanel31.add(jComboBoxDay);

        jComboBoxMonth.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12" }));
        jComboBoxMonth.setName("jComboBoxMonth"); // NOI18N
        jPanel31.add(jComboBoxMonth);

        jPanel29.add(jPanel31, java.awt.BorderLayout.CENTER);

        jPanel27.add(jPanel29, java.awt.BorderLayout.CENTER);

        jPanel24.add(jPanel27, java.awt.BorderLayout.CENTER);

        jPanel23.add(jPanel24);

        jPanel25.setName("jPanel25"); // NOI18N
        jPanel25.setLayout(new java.awt.GridLayout(1, 4, 10, 0));

        jButtonSave.setIcon(resourceMap.getIcon("jButtonSave.icon")); // NOI18N
        jButtonSave.setText(resourceMap.getString("jButtonSave.text")); // NOI18N
        jButtonSave.setName("jButtonSave"); // NOI18N
        jButtonSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonSaveActionPerformed(evt);
            }
        });
        jPanel25.add(jButtonSave);

        jButtonUpdate.setIcon(resourceMap.getIcon("jButtonUpdate.icon")); // NOI18N
        jButtonUpdate.setText(resourceMap.getString("jButtonUpdate.text")); // NOI18N
        jButtonUpdate.setName("jButtonUpdate"); // NOI18N
        jButtonUpdate.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonUpdateActionPerformed(evt);
            }
        });
        jPanel25.add(jButtonUpdate);

        jButtonClean.setIcon(resourceMap.getIcon("jButtonClean.icon")); // NOI18N
        jButtonClean.setText(resourceMap.getString("jButtonClean.text")); // NOI18N
        jButtonClean.setName("jButtonClean"); // NOI18N
        jButtonClean.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonCleanActionPerformed(evt);
            }
        });
        jPanel25.add(jButtonClean);

        jPanel23.add(jPanel25);

        jPanel18.add(jPanel23, java.awt.BorderLayout.CENTER);

        jPanel15.add(jPanel18, java.awt.BorderLayout.PAGE_END);

        jPanel13.add(jPanel15, java.awt.BorderLayout.CENTER);

        jPanel5.add(jPanel13, java.awt.BorderLayout.CENTER);

        jPanel2.add(jPanel5, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel2);

        jPanel3.setName("jPanel3"); // NOI18N
        jPanel3.setLayout(new java.awt.BorderLayout(5, 0));

        jPanel32.setName("jPanel32"); // NOI18N
        jPanel32.setPreferredSize(new java.awt.Dimension(50, 478));
        jPanel32.setLayout(new java.awt.BorderLayout());

        jPanel34.setName("jPanel34"); // NOI18N
        jPanel34.setPreferredSize(new java.awt.Dimension(50, 150));

        javax.swing.GroupLayout jPanel34Layout = new javax.swing.GroupLayout(jPanel34);
        jPanel34.setLayout(jPanel34Layout);
        jPanel34Layout.setHorizontalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel34Layout.setVerticalGroup(
            jPanel34Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 150, Short.MAX_VALUE)
        );

        jPanel32.add(jPanel34, java.awt.BorderLayout.PAGE_START);

        jPanel35.setName("jPanel35"); // NOI18N
        jPanel35.setPreferredSize(new java.awt.Dimension(50, 220));

        javax.swing.GroupLayout jPanel35Layout = new javax.swing.GroupLayout(jPanel35);
        jPanel35.setLayout(jPanel35Layout);
        jPanel35Layout.setHorizontalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 50, Short.MAX_VALUE)
        );
        jPanel35Layout.setVerticalGroup(
            jPanel35Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 220, Short.MAX_VALUE)
        );

        jPanel32.add(jPanel35, java.awt.BorderLayout.PAGE_END);

        jPanel36.setName("jPanel36"); // NOI18N
        jPanel36.setLayout(new java.awt.GridLayout(2, 1, 0, 105));

        jButtonNext.setIcon(resourceMap.getIcon("jButtonNext.icon")); // NOI18N
        jButtonNext.setName("jButtonNext"); // NOI18N
        jButtonNext.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonNextActionPerformed(evt);
            }
        });
        jPanel36.add(jButtonNext);

        jButtonPrevious.setIcon(resourceMap.getIcon("jButtonPrevious.icon")); // NOI18N
        jButtonPrevious.setName("jButtonPrevious"); // NOI18N
        jButtonPrevious.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButtonPreviousActionPerformed(evt);
            }
        });
        jPanel36.add(jButtonPrevious);

        jPanel32.add(jPanel36, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel32, java.awt.BorderLayout.LINE_START);

        jPanel33.setName("jPanel33"); // NOI18N
        jPanel33.setLayout(new java.awt.BorderLayout());

        jPanel37.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel37.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel37.border.titleFont"), resourceMap.getColor("jPanel37.border.titleColor"))); // NOI18N
        jPanel37.setName("jPanel37"); // NOI18N
        jPanel37.setPreferredSize(new java.awt.Dimension(446, 90));
        jPanel37.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jPanel40.setName("jPanel40"); // NOI18N
        jPanel40.setLayout(new java.awt.BorderLayout(15, 0));

        jPanel42.setName("jPanel42"); // NOI18N
        jPanel42.setLayout(new java.awt.BorderLayout());

        jTextFieldSearchDis.setName("jTextFieldSearchDis"); // NOI18N
        jTextFieldSearchDis.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTextFieldSearchDisKeyReleased(evt);
            }
        });
        jPanel42.add(jTextFieldSearchDis, java.awt.BorderLayout.CENTER);

        jPanel40.add(jPanel42, java.awt.BorderLayout.CENTER);

        jPanel57.setName("jPanel57"); // NOI18N
        jPanel57.setPreferredSize(new java.awt.Dimension(115, 33));
        jPanel57.setLayout(new java.awt.BorderLayout());

        jButton2.setIcon(resourceMap.getIcon("jButton2.icon")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });
        jPanel57.add(jButton2, java.awt.BorderLayout.CENTER);

        jPanel40.add(jPanel57, java.awt.BorderLayout.LINE_END);

        jPanel37.add(jPanel40);

        jPanel39.setName("jPanel39"); // NOI18N
        jPanel39.setLayout(new java.awt.BorderLayout());

        jPanel43.setName("jPanel43"); // NOI18N
        jPanel43.setPreferredSize(new java.awt.Dimension(0, 28));

        javax.swing.GroupLayout jPanel43Layout = new javax.swing.GroupLayout(jPanel43);
        jPanel43.setLayout(jPanel43Layout);
        jPanel43Layout.setHorizontalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 0, Short.MAX_VALUE)
        );
        jPanel43Layout.setVerticalGroup(
            jPanel43Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 28, Short.MAX_VALUE)
        );

        jPanel39.add(jPanel43, java.awt.BorderLayout.LINE_START);

        jPanel44.setName("jPanel44"); // NOI18N
        jPanel44.setLayout(new java.awt.GridLayout(1, 3, 43, 0));

        buttonGroup2.add(jRadioButtonDispatch);
        jRadioButtonDispatch.setText(resourceMap.getString("jRadioButtonDispatch.text")); // NOI18N
        jRadioButtonDispatch.setName("jRadioButtonDispatch"); // NOI18N
        jRadioButtonDispatch.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonDispatchActionPerformed(evt);
            }
        });
        jPanel44.add(jRadioButtonDispatch);

        buttonGroup2.add(jRadioButtonOrder);
        jRadioButtonOrder.setText(resourceMap.getString("jRadioButtonOrder.text")); // NOI18N
        jRadioButtonOrder.setName("jRadioButtonOrder"); // NOI18N
        jRadioButtonOrder.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jRadioButtonOrderActionPerformed(evt);
            }
        });
        jPanel44.add(jRadioButtonOrder);

        jButton3.setIcon(resourceMap.getIcon("jButton3.icon")); // NOI18N
        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });
        jPanel44.add(jButton3);

        jPanel39.add(jPanel44, java.awt.BorderLayout.CENTER);

        jPanel37.add(jPanel39);

        jPanel33.add(jPanel37, java.awt.BorderLayout.PAGE_START);

        jPanel38.setName("jPanel38"); // NOI18N
        jPanel38.setLayout(new java.awt.BorderLayout());

        jPanel45.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel45.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel45.border.titleFont"), resourceMap.getColor("jPanel45.border.titleColor"))); // NOI18N
        jPanel45.setName("jPanel45"); // NOI18N
        jPanel45.setPreferredSize(new java.awt.Dimension(446, 143));
        jPanel45.setLayout(new java.awt.BorderLayout());

        JTableOrder1.setName("JTableOrder1"); // NOI18N
        JTableOrder1.setPreferredSize(new java.awt.Dimension(452, 410));

        jTableDispatch.setName("jTableDispatch"); // NOI18N
        jTableDispatch.setPreferredSize(new java.awt.Dimension(0, 410));
        jTableDispatch.setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
        jTableDispatch.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jTableDispatchMouseClicked(evt);
            }
        });
        jTableDispatch.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyReleased(java.awt.event.KeyEvent evt) {
                jTableDispatchKeyReleased(evt);
            }
        });
        JTableOrder1.setViewportView(jTableDispatch);

        jPanel45.add(JTableOrder1, java.awt.BorderLayout.CENTER);

        jPanel38.add(jPanel45, java.awt.BorderLayout.PAGE_START);

        jPanel46.setName("jPanel46"); // NOI18N
        jPanel46.setLayout(new java.awt.BorderLayout());

        jPanel47.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel47.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel47.border.titleFont"), resourceMap.getColor("jPanel47.border.titleColor"))); // NOI18N
        jPanel47.setName("jPanel47"); // NOI18N
        jPanel47.setPreferredSize(new java.awt.Dimension(89, 170));
        jPanel47.setLayout(new java.awt.BorderLayout(25, 0));

        jPanel49.setName("jPanel49"); // NOI18N
        jPanel49.setLayout(new java.awt.GridLayout(5, 1, 0, 5));

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N
        jPanel49.add(jLabel1);

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N
        jPanel49.add(jLabel2);

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N
        jPanel49.add(jLabel3);

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N
        jPanel49.add(jLabel4);

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N
        jPanel49.add(jLabel5);

        jPanel47.add(jPanel49, java.awt.BorderLayout.LINE_START);

        jPanel50.setName("jPanel50"); // NOI18N
        jPanel50.setLayout(new java.awt.GridLayout(5, 1, 0, 5));

        jTextFieldName.setEnabled(false);
        jTextFieldName.setName("jTextFieldName"); // NOI18N
        jPanel50.add(jTextFieldName);

        jTextFieldSex.setEnabled(false);
        jTextFieldSex.setName("jTextFieldSex"); // NOI18N
        jPanel50.add(jTextFieldSex);

        jTextFieldAddress.setEnabled(false);
        jTextFieldAddress.setName("jTextFieldAddress"); // NOI18N
        jPanel50.add(jTextFieldAddress);

        jTextFieldEmail.setEnabled(false);
        jTextFieldEmail.setName("jTextFieldEmail"); // NOI18N
        jPanel50.add(jTextFieldEmail);

        jTextFieldPhone.setEnabled(false);
        jTextFieldPhone.setName("jTextFieldPhone"); // NOI18N
        jPanel50.add(jTextFieldPhone);

        jPanel47.add(jPanel50, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel47, java.awt.BorderLayout.PAGE_START);

        jPanel48.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createEtchedBorder(), resourceMap.getString("jPanel48.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel48.border.titleFont"), resourceMap.getColor("jPanel48.border.titleColor"))); // NOI18N
        jPanel48.setName("jPanel48"); // NOI18N
        jPanel48.setLayout(new java.awt.BorderLayout(0, 5));

        jPanel51.setName("jPanel51"); // NOI18N
        jPanel51.setPreferredSize(new java.awt.Dimension(434, 55));
        jPanel51.setLayout(new java.awt.BorderLayout(25, 0));

        jPanel53.setName("jPanel53"); // NOI18N
        jPanel53.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N
        jPanel53.add(jLabel13);

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N
        jPanel53.add(jLabel15);

        jPanel51.add(jPanel53, java.awt.BorderLayout.LINE_START);

        jPanel54.setName("jPanel54"); // NOI18N
        jPanel54.setLayout(new java.awt.GridLayout(2, 1, 0, 5));

        jTextFieldNameBackEnd.setEnabled(false);
        jTextFieldNameBackEnd.setName("jTextFieldNameBackEnd"); // NOI18N
        jPanel54.add(jTextFieldNameBackEnd);

        jPanel55.setName("jPanel55"); // NOI18N
        jPanel55.setLayout(new java.awt.BorderLayout(10, 0));

        jTextFieldDateSolve.setEditable(false);
        jTextFieldDateSolve.setText(resourceMap.getString("jTextFieldDateSolve.text")); // NOI18N
        jTextFieldDateSolve.setName("jTextFieldDateSolve"); // NOI18N
        jPanel55.add(jTextFieldDateSolve, java.awt.BorderLayout.CENTER);

        jPanel54.add(jPanel55);

        jPanel51.add(jPanel54, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel51, java.awt.BorderLayout.PAGE_START);

        jPanel52.setName("jPanel52"); // NOI18N
        jPanel52.setPreferredSize(new java.awt.Dimension(434, 50));
        jPanel52.setLayout(new java.awt.BorderLayout(15, 0));

        jPanel59.setName("jPanel59"); // NOI18N
        jPanel59.setLayout(new java.awt.GridLayout(2, 1));

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N
        jPanel59.add(jLabel14);

        jPanel52.add(jPanel59, java.awt.BorderLayout.LINE_START);

        jPanel60.setName("jPanel60"); // NOI18N
        jPanel60.setLayout(new java.awt.BorderLayout());

        jScrollPane5.setName("jScrollPane5"); // NOI18N

        jTextArea2.setColumns(20);
        jTextArea2.setEditable(false);
        jTextArea2.setRows(5);
        jTextArea2.setEnabled(false);
        jTextArea2.setName("jTextArea2"); // NOI18N
        jScrollPane5.setViewportView(jTextArea2);

        jPanel60.add(jScrollPane5, java.awt.BorderLayout.CENTER);

        jPanel52.add(jPanel60, java.awt.BorderLayout.CENTER);

        jPanel48.add(jPanel52, java.awt.BorderLayout.CENTER);

        jPanel46.add(jPanel48, java.awt.BorderLayout.CENTER);

        jPanel38.add(jPanel46, java.awt.BorderLayout.CENTER);

        jPanel33.add(jPanel38, java.awt.BorderLayout.CENTER);

        jPanel3.add(jPanel33, java.awt.BorderLayout.CENTER);

        jPanel1.add(jPanel3);

        getContentPane().add(jPanel1, java.awt.BorderLayout.CENTER);

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButtonSearchReportActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSearchReportActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonIDDispatch.isSelected() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("ChooseDispatch"));

        } else if (jRadioButtonIDDispatch.isSelected() == true) {
            if (jTextFieldSearchReport.getText().trim().length() == 0) {
                JOptionPane.showMessageDialog(null, rb.getString("InputText"));
            } else if (jTextFieldSearchReport.getText().trim().length() != 0) {
                if (CommonQuery.CheckIntNumber(jTextFieldSearchReport.getText()) == false) {
                    JOptionPane.showMessageDialog(null, rb.getString("InputNumber"));
                } else if (BugReport.ListIDRPONIPDISPATCH(Integer.parseInt(jTextFieldSearchReport.getText())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindValue"));
                    DisplayReportNull();
                    return;
                } else {
                    DisplayReport(BugReport.ListIDRPONIPDISPATCH(Integer.parseInt(jTextFieldSearchReport.getText())));
                }
            }
        }
}//GEN-LAST:event_jButtonSearchReportActionPerformed

    private void jRadioButtonIDDispatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonIDDispatchActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonIDDispatchActionPerformed

    private void jRadioButtonNotSolveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonNotSolveActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonNotSolve.isSelected() == true) {
            DisplayReport(BugReport.ListIDRPONSTATUS(1));
        }
}//GEN-LAST:event_jRadioButtonNotSolveActionPerformed

    private void jRadioButtonSolveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonSolveActionPerformed
        // TODO add your handling code here:
        if (jRadioButtonSolve.isSelected() == true) {
            DisplayReport(BugReport.ListIDRPONSTATUS(2));
        }
}//GEN-LAST:event_jRadioButtonSolveActionPerformed

    private void jTableReportMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableReportMouseClicked
        try {
            r1 = jTableReport.getSelectedRow();
            idreport = Integer.parseInt(jTableReport.getValueAt(r1, 0).toString());
            String nametype = TypeReport.ListType(idreport);
            String namestatus = Status.ListStatus(idreport);
            idcustomer = Customer.ListIDCustom(idreport);
            String nameback = Solution.ListNameBackEnd(idreport);
            String namecustom = Customer.ListNameCustom(idreport);
            iddispatch1 = BugReport.ListReportONIDReport(idreport).get(0).getIddispatch();
            int iddispatch = BugReport.ListReportONIDReport(idreport).get(0).getIddispatch();
            String title = BugReport.ListReportONIDReport(idreport).get(0).getTitle();
            String content = BugReport.ListReportONIDReport(idreport).get(0).getContent();
            String solution = Solution.ListIDSL(idreport).getSolution();
            String datefinish = BugReport.ListReportONIDReport(idreport).get(0).getDatefinish().toString();
            String[] a = datefinish.split("-");
            String day = "";
            String month = "";
            String year = "";
            year = a[0];
            month = a[1];
            day = a[2];
            String day1 = "";
            String month1 = "";
            String year1 = "";
            if (String.valueOf(Solution.ListIDSL(idreport).getDate_solve()).length() - 4 != 0) {

                String datesolve = String.valueOf(Solution.ListIDSL(idreport).getDate_solve().toString());
                String[] a1 = datesolve.split("-");
                year1 = a1[0];
                month1 = a1[1];
                day1 = a1[2];
            }
            jTextFieldNameCustom.setText(namecustom);
            jTextFieldIDDispatch.setText(String.valueOf(iddispatch));
            jComboBoxType.setSelectedItem(nametype);
            jTextFieldTitle.setText(title);
            jTextAreaContent.setText(content);
            jComboBoxDay.setSelectedItem(day);
            jComboBoxMonth.setSelectedItem(month);
            jComboBoxYear.setSelectedItem(year);
            jTextFieldNameBackEnd.setText(nameback);
            jTextArea2.setText(solution);
            jTextFieldDateSolve.setText(year1 + "-" + month1 + "-" + day1);
            jTextFieldStatus.setText(namestatus);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableReportMouseClicked

    private void jButtonSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonSaveActionPerformed
        // TODO add your handling code here:
        String month = jComboBoxMonth.getSelectedItem().toString();
        String day = jComboBoxDay.getSelectedItem().toString();
        if (CheckDate() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("Month") + " " + month + rb.getString("DontHaveDay") + " " + day);
        } else if (CanculateDay() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("DateAbove"));
        } else {
            try {
                BugReport rp = new BugReport();
                int index = jComboBoxType.getSelectedIndex();
                if (jTextFieldNameCustom.getText().toString().trim().length() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("PleaseChooseDispatch"));
                } else if (jTextFieldTitle.getText().toString().trim().length() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("PleaseInputTitle"));
                } else if (jTextAreaContent.getText().toString().trim().length() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("PleaseInputContent"));
                } else {
                    rp.setIdcustomer(idcustomer);
                    rp.setIddispatch(Integer.parseInt(jTextFieldIDDispatch.getText().toString().trim()));
                    rp.setIdfrontend(idemployee);
                    rp.setIdtype(valuetype.get(index));
                    rp.setTitle(jTextFieldTitle.getText());
                    rp.setContent(jTextAreaContent.getText());
                    Date now = new Date();
                    java.sql.Date now1 = new java.sql.Date(now.getTime());
                    rp.setDatereceive(now1);
                    String finish = this.jComboBoxYear.getSelectedItem().toString() + "-" + this.jComboBoxMonth.getSelectedItem().toString() + "-" + this.jComboBoxDay.getSelectedItem().toString();
                    SimpleDateFormat spf = new SimpleDateFormat("yyyy-MM-dd");
                    spf.setLenient(false);
                    Date finish1 = spf.parse(finish);
                    java.sql.Date finish11 = new java.sql.Date(finish1.getTime());
                    rp.setDatefinish(finish11);
                    int a = 1;
                    rp.setIDStatus(a);
                    if (rp.AddReportFontEnd() == true) {
                        JOptionPane.showMessageDialog(null, rb.getString("AddSucess"));
                        DisplayReport(BugReport.ListIDRP());
                        this.jTextFieldNameCustom.setText("");
                        this.jTextFieldIDDispatch.setText("");
                        this.jTextFieldTitle.setText("");
                        this.jTextAreaContent.setText("");
                        this.jTextFieldNameCustom.setText("");
                        iddispatch = -1;
                        idreport = -1;
                    } else {
                        JOptionPane.showMessageDialog(null, rb.getString("AddFail"));
                    }
                }
            } catch (Exception ex) {
            }
        }

}//GEN-LAST:event_jButtonSaveActionPerformed

    private void jButtonUpdateActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonUpdateActionPerformed
        // TODO add your handling code here:
        String month = jComboBoxMonth.getSelectedItem().toString();
        String day = jComboBoxDay.getSelectedItem().toString();
        if (CheckDate() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("Month") + " " + month + rb.getString("DontHaveDay") + " " + day);
        } else if (CanculateDay() == false) {
            JOptionPane.showMessageDialog(null, rb.getString("DateAbove"));
        } else if (idreport < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("PleaseChooseReport"));
        } else {
            try {
                BugReport rp = new BugReport();
                if (jTextFieldNameCustom.getText().toString().trim().length() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("PleaseChooseDispatch"));
                } else if (jTextFieldTitle.getText().toString().trim().length() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("PleaseInputTitle"));
                } else if (jTextAreaContent.getText().toString().trim().length() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("PleaseInputContent"));
                } else {
                    rp.setIdreport(idreport);
                    int index = jComboBoxType.getSelectedIndex();
                    rp.setIdcustomer(idcustomer);
                    rp.setIddispatch(Integer.parseInt(jTextFieldIDDispatch.getText().toString().trim()));
                    rp.setIdfrontend(idemployee);
                    rp.setIdtype(valuetype.get(index));
                    rp.setTitle(jTextFieldTitle.getText());
                    rp.setContent(jTextAreaContent.getText());
                    Date now = new Date();
                    java.sql.Date now1 = new java.sql.Date(now.getTime());
                    rp.setDatereceive(now1);
                    String finish = this.jComboBoxYear.getSelectedItem().toString() + "-" + this.jComboBoxMonth.getSelectedItem().toString() + "-" + this.jComboBoxDay.getSelectedItem().toString();
                    SimpleDateFormat spf = new SimpleDateFormat("yyyy-MM-dd");
                    spf.setLenient(false);
                    Date finish1 = spf.parse(finish);
                    java.sql.Date finish11 = new java.sql.Date(finish1.getTime());
                    rp.setDatefinish(finish11);
                    int a = 1;
                    rp.setIDStatus(a);
                    if (rp.updatebugreport() == true) {
                        JOptionPane.showMessageDialog(null, rb.getString("UpdateSuccess"));
                        DisplayReport(BugReport.ListReportONIDReport(idreport));
                        this.jTextFieldNameCustom.setText("");
                        this.jTextFieldIDDispatch.setText("");
                        this.jTextFieldTitle.setText("");
                        this.jTextAreaContent.setText("");
                        this.jTextFieldNameCustom.setText("");
                        iddispatch = -1;
                        idreport = -1;
                    } else {
                        JOptionPane.showMessageDialog(null, rb.getString("UpdateFail"));
                    }
                }
            } catch (Exception ex) {
            }
        }
}//GEN-LAST:event_jButtonUpdateActionPerformed

    private void jButtonCleanActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCleanActionPerformed

        this.jTextFieldNameCustom.setText("");
        this.jTextFieldIDDispatch.setText("");
        this.jTextFieldTitle.setText("");
        this.jTextAreaContent.setText("");
        iddispatch = -1;
        idreport = -1;
}//GEN-LAST:event_jButtonCleanActionPerformed

    private void jButtonPreviousActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonPreviousActionPerformed
        // TODO add your handling code here:
        if (iddispatch < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("PleaseSelectDispatch"));
        } else {
            jTextFieldNameCustom.setText(namecustomer);
            jTextFieldIDDispatch.setText(String.valueOf(iddispatch));
        }
}//GEN-LAST:event_jButtonPreviousActionPerformed

    private void jButtonNextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonNextActionPerformed
        // TODO add your handling code here:
        if (iddispatch1 < 0) {
            JOptionPane.showMessageDialog(null, rb.getString("PleaseChooseOneReport"));
        } else {
            DisplayDispatch(DispatchNo.ListIDDONID(iddispatch1));

        }
}//GEN-LAST:event_jButtonNextActionPerformed

    private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:

        if (jTextFieldSearchDis.getText().trim().length() == 0) {
            JOptionPane.showMessageDialog(null, rb.getString("InputText"));
        } else {

            if (jRadioButtonDispatch.isSelected() == false && jRadioButtonOrder.isSelected() == false) {
                JOptionPane.showMessageDialog(null, rb.getString("SelectOption"));
            }
            if (jRadioButtonDispatch.isSelected() == true) {
                if (CommonQuery.CheckIntNumber(jTextFieldSearchDis.getText()) == false) {
                    JOptionPane.showMessageDialog(null, rb.getString("InputNumber"));
                } else if (DispatchNo.ListIDDONID(Integer.parseInt(jTextFieldSearchDis.getText())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindValue"));
                    DisplayDispatchNull();
                    return;
                } else {
                    DisplayDispatch(DispatchNo.ListIDDONID(Integer.parseInt(jTextFieldSearchDis.getText())));
                }
            }
            if (jRadioButtonOrder.isSelected() == true) {
                if (CommonQuery.CheckIntNumber(jTextFieldSearchDis.getText()) == false) {
                    JOptionPane.showMessageDialog(null, rb.getString("InputNumber"));
                } else if (DispatchNo.ListIDDONOD(Integer.parseInt(jTextFieldSearchDis.getText())).size() == 0) {
                    JOptionPane.showMessageDialog(null, rb.getString("CantFindValueOrder"));
                    DisplayDispatchNull();
                    return;
                } else {
                    DisplayDispatch(DispatchNo.ListIDDONOD(Integer.parseInt(jTextFieldSearchDis.getText())));
                }
            }
        }
}//GEN-LAST:event_jButton2ActionPerformed

    private void jTextFieldSearchDisKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldSearchDisKeyReleased
}//GEN-LAST:event_jTextFieldSearchDisKeyReleased

    private void jRadioButtonDispatchActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonDispatchActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonDispatchActionPerformed

    private void jRadioButtonOrderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jRadioButtonOrderActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_jRadioButtonOrderActionPerformed

    private void jTableDispatchMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableDispatchMouseClicked
        // TODO add your handling code here:
        try {
            r = this.jTableDispatch.getSelectedRow();
            int idorder = Integer.parseInt(this.jTableDispatch.getValueAt(r, 1).toString());
            String name = Customer.ListIDEONID(idorder).getNamecustomer();
            String sex = Customer.ListIDEONID(idorder).getSex();
            String address = Customer.ListIDEONID(idorder).getHomeaddress();
            String email = Customer.ListIDEONID(idorder).getEmail();
            String phone = String.valueOf(Customer.ListIDEONID(idorder).getPhone());
            iddispatch = Integer.parseInt(this.jTableDispatch.getValueAt(r, 0).toString());
            idcustomer = Customer.ListIDEONID(idorder).getIdcustomer();
            namecustomer = Customer.ListIDEONID(idorder).getNamecustomer();
            jTextFieldAddress.setText(address);
            jTextFieldEmail.setText(email);
            jTextFieldName.setText(name);
            jTextFieldSex.setText(sex);
            jTextFieldPhone.setText(phone);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableDispatchMouseClicked

    private void jTableReportMouseEntered(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_jTableReportMouseEntered
        // TODO add your handling code here:
    }//GEN-LAST:event_jTableReportMouseEntered

    private void jTableReportKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTableReportKeyReleased
        // TODO add your handling code here:
        try {
            r1 = jTableReport.getSelectedRow();
            idreport = Integer.parseInt(jTableReport.getValueAt(r1, 0).toString());
            String nametype = TypeReport.ListType(idreport);
            String namestatus = Status.ListStatus(idreport);
            idcustomer = Customer.ListIDCustom(idreport);
            String nameback = Solution.ListNameBackEnd(idreport);
            String namecustom = Customer.ListNameCustom(idreport);
            iddispatch1 = BugReport.ListReportONIDReport(idreport).get(0).getIddispatch();
            int iddispatch = BugReport.ListReportONIDReport(idreport).get(0).getIddispatch();
            String title = BugReport.ListReportONIDReport(idreport).get(0).getTitle();
            String content = BugReport.ListReportONIDReport(idreport).get(0).getContent();
            String solution = Solution.ListIDSL(idreport).getSolution();
            String datefinish = BugReport.ListReportONIDReport(idreport).get(0).getDatefinish().toString();
            String[] a = datefinish.split("-");
            String day = "";
            String month = "";
            String year = "";
            year = a[0];
            month = a[1];
            day = a[2];
            String day1 = "";
            String month1 = "";
            String year1 = "";
            if (String.valueOf(Solution.ListIDSL(idreport).getDate_solve()).length() - 4 != 0) {

                String datesolve = String.valueOf(Solution.ListIDSL(idreport).getDate_solve().toString());
                String[] a1 = datesolve.split("-");
                year1 = a1[0];
                month1 = a1[1];
                day1 = a1[2];
            }
            jTextFieldNameCustom.setText(namecustom);
            jTextFieldIDDispatch.setText(String.valueOf(iddispatch));
            jComboBoxType.setSelectedItem(nametype);
            jTextFieldTitle.setText(title);
            jTextAreaContent.setText(content);
            jComboBoxDay.setSelectedItem(day);
            jComboBoxMonth.setSelectedItem(month);
            jComboBoxYear.setSelectedItem(year);
            jTextFieldNameBackEnd.setText(nameback);
            jTextArea2.setText(solution);
            jTextFieldDateSolve.setText(year1 + "-" + month1 + "-" + day1);
            jTextFieldStatus.setText(namestatus);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableReportKeyReleased

    private void jTableDispatchKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTableDispatchKeyReleased
        // TODO add your handling code here:
        try {
            r = this.jTableDispatch.getSelectedRow();

            //Sidem=Integer.parseInt(this.jTable1.getValueAt(r,0).toString());
            int idorder = Integer.parseInt(this.jTableDispatch.getValueAt(r, 1).toString());
            String name = Customer.ListIDEONID(idorder).getNamecustomer();
            String sex = Customer.ListIDEONID(idorder).getSex();
            String address = Customer.ListIDEONID(idorder).getHomeaddress();
            String email = Customer.ListIDEONID(idorder).getEmail();
            String phone = String.valueOf(Customer.ListIDEONID(idorder).getPhone());
            iddispatch = Integer.parseInt(this.jTableDispatch.getValueAt(r, 0).toString());
            idcustomer = Customer.ListIDEONID(idorder).getIdcustomer();
            namecustomer = Customer.ListIDEONID(idorder).getNamecustomer();
            jTextFieldAddress.setText(address);
            jTextFieldEmail.setText(email);
            jTextFieldName.setText(name);
            jTextFieldSex.setText(sex);
            jTextFieldPhone.setText(phone);
        } catch (Exception ex) {
        }
    }//GEN-LAST:event_jTableDispatchKeyReleased

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
        DisplayReport(BugReport.ListIDRP());
        this.jTextFieldNameCustom.setText("");
        this.jTextFieldIDDispatch.setText("");
        this.jTextFieldTitle.setText("");
        this.jTextAreaContent.setText("");
        jTextFieldNameBackEnd.setText("");
        jTextFieldDateSolve.setText("");
        jTextArea2.setText("");
        iddispatch = -1;
        idreport = -1;
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
        // TODO add your handling code here:
        DisplayDispatch(ep1);
        jTextFieldName.setText("");
        jTextFieldSex.setText("");
        jTextFieldAddress.setText("");
        jTextFieldEmail.setText("");
        jTextFieldPhone.setText("");
    }//GEN-LAST:event_jButton3ActionPerformed
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JScrollPane JTableOrder;
    private javax.swing.JScrollPane JTableOrder1;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.ButtonGroup buttonGroup2;
    private javax.swing.ButtonGroup buttonGroup3;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButtonClean;
    private javax.swing.JButton jButtonNext;
    private javax.swing.JButton jButtonPrevious;
    private javax.swing.JButton jButtonSave;
    private javax.swing.JButton jButtonSearchReport;
    private javax.swing.JButton jButtonUpdate;
    private javax.swing.JComboBox jComboBoxDay;
    private javax.swing.JComboBox jComboBoxMonth;
    private javax.swing.JComboBox jComboBoxType;
    private javax.swing.JComboBox jComboBoxYear;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel13;
    private javax.swing.JPanel jPanel14;
    private javax.swing.JPanel jPanel15;
    private javax.swing.JPanel jPanel16;
    private javax.swing.JPanel jPanel17;
    private javax.swing.JPanel jPanel18;
    private javax.swing.JPanel jPanel19;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel20;
    private javax.swing.JPanel jPanel21;
    private javax.swing.JPanel jPanel22;
    private javax.swing.JPanel jPanel23;
    private javax.swing.JPanel jPanel24;
    private javax.swing.JPanel jPanel25;
    private javax.swing.JPanel jPanel26;
    private javax.swing.JPanel jPanel27;
    private javax.swing.JPanel jPanel28;
    private javax.swing.JPanel jPanel29;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel30;
    private javax.swing.JPanel jPanel31;
    private javax.swing.JPanel jPanel32;
    private javax.swing.JPanel jPanel33;
    private javax.swing.JPanel jPanel34;
    private javax.swing.JPanel jPanel35;
    private javax.swing.JPanel jPanel36;
    private javax.swing.JPanel jPanel37;
    private javax.swing.JPanel jPanel38;
    private javax.swing.JPanel jPanel39;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel40;
    private javax.swing.JPanel jPanel41;
    private javax.swing.JPanel jPanel42;
    private javax.swing.JPanel jPanel43;
    private javax.swing.JPanel jPanel44;
    private javax.swing.JPanel jPanel45;
    private javax.swing.JPanel jPanel46;
    private javax.swing.JPanel jPanel47;
    private javax.swing.JPanel jPanel48;
    private javax.swing.JPanel jPanel49;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel50;
    private javax.swing.JPanel jPanel51;
    private javax.swing.JPanel jPanel52;
    private javax.swing.JPanel jPanel53;
    private javax.swing.JPanel jPanel54;
    private javax.swing.JPanel jPanel55;
    private javax.swing.JPanel jPanel57;
    private javax.swing.JPanel jPanel58;
    private javax.swing.JPanel jPanel59;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel60;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JRadioButton jRadioButtonDispatch;
    private javax.swing.JRadioButton jRadioButtonIDDispatch;
    private javax.swing.JRadioButton jRadioButtonNotSolve;
    private javax.swing.JRadioButton jRadioButtonOrder;
    private javax.swing.JRadioButton jRadioButtonSolve;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTable jTable1;
    private javax.swing.JTable jTableDispatch;
    private javax.swing.JTable jTableReport;
    private javax.swing.JTextArea jTextArea2;
    private javax.swing.JTextArea jTextAreaContent;
    private javax.swing.JTextField jTextFieldAddress;
    private javax.swing.JTextField jTextFieldDateSolve;
    private javax.swing.JTextField jTextFieldEmail;
    private javax.swing.JTextField jTextFieldIDDispatch;
    private javax.swing.JTextField jTextFieldName;
    private javax.swing.JTextField jTextFieldNameBackEnd;
    private javax.swing.JTextField jTextFieldNameCustom;
    private javax.swing.JTextField jTextFieldPhone;
    private javax.swing.JTextField jTextFieldSearchDis;
    private javax.swing.JTextField jTextFieldSearchReport;
    private javax.swing.JTextField jTextFieldSex;
    private javax.swing.JTextField jTextFieldStatus;
    private javax.swing.JTextField jTextFieldTitle;
    // End of variables declaration//GEN-END:variables
}
